﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Web;

namespace Common
{
    public static class ASCALLDES
    {
       

        public static String getParamSrc(Dictionary<string, string> paramsMap)
        {
          
            String result = string.Join("&", paramsMap.Select(i => i.Key + "=" + i.Value).OrderBy(v => v));
          
            return result;
        }

        public static string ToMd5(string s)
        {
           return string.Join("", MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(s)).Select(v => v.ToString("x2")));
        }
    }
}